﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.AutoMapper;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using FwProject.Core.Restaurant;
using FwProject.Core.TypeNumber;
using FwProject.TypeNumber.Dto;
using Abp.ObjectMapping;
using AutoMapper;

namespace FwProject.Restaurant.Dto
{
    [AutoMap(typeof(RestaurantTypenNumberInfo))]
    public class RestaurantTypeNumberDto : Entity<Guid>, ICreationAudited
    {
        public Guid? FactoryinfoId { get; set; }
        /// <summary>
        /// 型号编号
        /// </summary>
        /// <value>The type number identifier.</value>

        [Display(Name = "型号编号")]
        public Guid TypeNumberId { get; set; }

        public TypeNumberInfoDto TypeNumberInfoModel { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        /// <value>The price.</value>

        [Display(Name = "单价")]
        public decimal Price { get; set; } = 0;
        /// <summary>
        /// 餐厅编号
        /// </summary>
        /// <value>The restaurantid.</value>

        [Display(Name = "餐厅编号")]
        public Guid Restaurantid { get; set; }

        public RestaurantDto RestaurantInfoModel { get; set; }

        public bool IsDefault { get; set; } = false;

        public long? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }

        [IgnoreMap]
        public  LoadCarTypeNumber LoadCarTypeNumber { get;set;}
    }

    public class LoadCarTypeNumber
    {
        public Guid TypeNumberInfoId { get; set; }

        /// <summary>
        /// 配送剩余数量
        /// </summary>
        public int? Distributioncount { get; set; } = 0;
        /// <summary>
        /// 退箱
        /// </summary>
        public int? Backboxcount { get; set; } = 0;
    }

}
